package cn.tpshion.vm.common.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class DateUtil {

    public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public static final String DATE_FORMAT_NO = "yyyy-MM-dd-HH-mm-ss";

    public static final DateTimeFormatter Date_Time_Formatter = DateTimeFormatter.ofPattern(DATE_FORMAT);

    public static final DateTimeFormatter Date_Time_Formatter_No = DateTimeFormatter.ofPattern(DATE_FORMAT_NO);

    public static String now() {
        return LocalDateTime.now().format(Date_Time_Formatter);
    }

    public static String now(DateTimeFormatter dateTimeFormatter) {
        return LocalDateTime.now().format(dateTimeFormatter);
    }
}
